package pl.prv.polanie.client.panels.lists;

import pl.prv.polanie.client.dto.CSStudiesTypeDTO;
import pl.prv.polanie.client.dto.StudiesTypeDTO;
import pl.prv.polanie.client.model.Cache;

import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class StudiesTypesList extends VerticalPanel {

	public StudiesTypesList() {
		
		FlexTable ft = new FlexTable();
		getInstance().add(ft);
		
		CSStudiesTypeDTO[] sts = Cache.getAllStudiesTypes();
		for (int i = 0; i < sts.length; i++) {
			ft.setWidget(i, 0, new Label(sts[i].getName()));
		}
	}

	private StudiesTypesList getInstance() {
		return this;
	}

}
